Integrand size = 31, antiderivative size = 161 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^2} \, dx=-\frac {a^3 (2 c-3 d) \text {arctanh}(\sin (e+f x))}{d^3 f}+\frac {2 a^3 (c-d)^{3/2} (2 c+3 d) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{d^3 (c+d)^{3/2} f}+\frac {2 a^3 c \tan (e+f x)}{d^2 (c+d) f}-\frac {(c-d) \left (a^3+a^3 \sec (e+f x)\right ) \tan (e+f x)}{d (c+d) f (c+d \sec (e+f x))} \]
-a^3*(2*c-3*d)*arctanh(sin(f*x+e))/d^3/f+2*a^3*(c-d)^(3/2)*(2*c+3*d)*arcta nh((c-d)^(1/2)*tan(1/2*f*x+1/2*e)/(c+d)^(1/2))/d^3/(c+d)^(3/2)/f+2*a^3*c*t an(f*x+e)/d^2/(c+d)/f-(c-d)*(a^3+a^3*sec(f*x+e))*tan(f*x+e)/d/(c+d)/f/(c+d *sec(f*x+e))
Result contains complex when optimal does not.
Time = 5.18 (sec) , antiderivative size = 455, normalized size of antiderivative = 2.83 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^2} \, dx=\frac {a^3 \cos (e+f x) (d+c \cos (e+f x)) \sec ^6\left (\frac {1}{2} (e+f x)\right ) (1+\sec (e+f x))^3 \left ((2 c-3 d) (d+c \cos (e+f x)) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )+(-2 c+3 d) (d+c \cos (e+f x)) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )-\frac {2 i (c-d)^2 (2 c+3 d) \arctan \left (\frac {(i \cos (e)+\sin (e)) \left (c \sin (e)+(-d+c \cos (e)) \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {c^2-d^2} \sqrt {(\cos (e)-i \sin (e))^2}}\right ) (d+c \cos (e+f x)) (\cos (e)-i \sin (e))}{(c+d) \sqrt {c^2-d^2} \sqrt {(\cos (e)-i \sin (e))^2}}+\frac {(c-d)^2 d (-d \sin (e)+c \sin (f x))}{c (c+d) \left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )\right )}+\frac {d (d+c \cos (e+f x)) \sin \left (\frac {f x}{2}\right )}{\left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )}+\frac {d (d+c \cos (e+f x)) \sin \left (\frac {f x}{2}\right )}{\left (\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )}\right )}{8 d^3 f (c+d \sec (e+f x))^2} \]
(a^3*Cos[e + f*x]*(d + c*Cos[e + f*x])*Sec[(e + f*x)/2]^6*(1 + Sec[e + f*x ])^3*((2*c - 3*d)*(d + c*Cos[e + f*x])*Log[Cos[(e + f*x)/2] - Sin[(e + f*x )/2]] + (-2*c + 3*d)*(d + c*Cos[e + f*x])*Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]] - ((2*I)*(c - d)^2*(2*c + 3*d)*ArcTan[((I*Cos[e] + Sin[e])*(c*Sin [e] + (-d + c*Cos[e])*Tan[(f*x)/2]))/(Sqrt[c^2 - d^2]*Sqrt[(Cos[e] - I*Sin [e])^2])]*(d + c*Cos[e + f*x])*(Cos[e] - I*Sin[e]))/((c + d)*Sqrt[c^2 - d^ 2]*Sqrt[(Cos[e] - I*Sin[e])^2]) + ((c - d)^2*d*(-(d*Sin[e]) + c*Sin[f*x])) /(c*(c + d)*(Cos[e/2] - Sin[e/2])*(Cos[e/2] + Sin[e/2])) + (d*(d + c*Cos[e + f*x])*Sin[(f*x)/2])/((Cos[e/2] - Sin[e/2])*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])) + (d*(d + c*Cos[e + f*x])*Sin[(f*x)/2])/((Cos[e/2] + Sin[e/2])* (Cos[(e + f*x)/2] + Sin[(e + f*x)/2]))))/(8*d^3*f*(c + d*Sec[e + f*x])^2)
Time = 0.48 (sec) , antiderivative size = 284, normalized size of antiderivative = 1.76, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.355, Rules used = {3042, 4475, 109, 27, 171, 25, 27, 175, 45, 104, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec (e+f x) (a \sec (e+f x)+a)^3}{(c+d \sec (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^3}{\left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 4475 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \int \frac {(\sec (e+f x) a+a)^{5/2}}{\sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))^2}d\sec (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 109 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{d (c+d) (c+d \sec (e+f x))}-\frac {\int \frac {a^3 \sqrt {\sec (e+f x) a+a} (-2 \sec (e+f x) c+c-3 d)}{\sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))}d\sec (e+f x)}{a d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{d (c+d) (c+d \sec (e+f x))}-\frac {a^2 \int \frac {\sqrt {\sec (e+f x) a+a} (-2 \sec (e+f x) c+c-3 d)}{\sqrt {a-a \sec (e+f x)} (c+d \sec (e+f x))}d\sec (e+f x)}{d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 171 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{d (c+d) (c+d \sec (e+f x))}-\frac {a^2 \left (\frac {2 c \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d}-\frac {\int -\frac {a^2 ((c-3 d) d+(2 c-3 d) (c+d) \sec (e+f x))}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{a d}\right )}{d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{d (c+d) (c+d \sec (e+f x))}-\frac {a^2 \left (\frac {\int \frac {a^2 ((c-3 d) d+(2 c-3 d) (c+d) \sec (e+f x))}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{a d}+\frac {2 c \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d}\right )}{d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{d (c+d) (c+d \sec (e+f x))}-\frac {a^2 \left (\frac {a \int \frac {(c-3 d) d+(2 c-3 d) (c+d) \sec (e+f x)}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{d}+\frac {2 c \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d}\right )}{d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 175 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{d (c+d) (c+d \sec (e+f x))}-\frac {a^2 \left (\frac {a \left (\frac {(2 c-3 d) (c+d) \int \frac {1}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a}}d\sec (e+f x)}{d}-\frac {(c-d)^2 (2 c+3 d) \int \frac {1}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{d}\right )}{d}+\frac {2 c \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d}\right )}{d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 45 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{d (c+d) (c+d \sec (e+f x))}-\frac {a^2 \left (\frac {a \left (\frac {2 (2 c-3 d) (c+d) \int \frac {1}{-\frac {(a-a \sec (e+f x)) a}{\sec (e+f x) a+a}-a}d\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {\sec (e+f x) a+a}}}{d}-\frac {(c-d)^2 (2 c+3 d) \int \frac {1}{\sqrt {a-a \sec (e+f x)} \sqrt {\sec (e+f x) a+a} (c+d \sec (e+f x))}d\sec (e+f x)}{d}\right )}{d}+\frac {2 c \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d}\right )}{d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 104 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{d (c+d) (c+d \sec (e+f x))}-\frac {a^2 \left (\frac {a \left (\frac {2 (2 c-3 d) (c+d) \int \frac {1}{-\frac {(a-a \sec (e+f x)) a}{\sec (e+f x) a+a}-a}d\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {\sec (e+f x) a+a}}}{d}-\frac {2 (c-d)^2 (2 c+3 d) \int \frac {1}{a (c-d)+\frac {a (c+d) (\sec (e+f x) a+a)}{a-a \sec (e+f x)}}d\frac {\sqrt {\sec (e+f x) a+a}}{\sqrt {a-a \sec (e+f x)}}}{d}\right )}{d}+\frac {2 c \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d}\right )}{d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {a^2 \tan (e+f x) \left (\frac {(c-d) \sqrt {a-a \sec (e+f x)} (a \sec (e+f x)+a)^{3/2}}{d (c+d) (c+d \sec (e+f x))}-\frac {a^2 \left (\frac {a \left (-\frac {2 (2 c+3 d) (c-d)^{3/2} \arctan \left (\frac {\sqrt {c+d} \sqrt {a \sec (e+f x)+a}}{\sqrt {c-d} \sqrt {a-a \sec (e+f x)}}\right )}{a d \sqrt {c+d}}-\frac {2 (2 c-3 d) (c+d) \arctan \left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a \sec (e+f x)+a}}\right )}{a d}\right )}{d}+\frac {2 c \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}{a d}\right )}{d (c+d)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}\) |
-((a^2*(((c - d)*Sqrt[a - a*Sec[e + f*x]]*(a + a*Sec[e + f*x])^(3/2))/(d*( c + d)*(c + d*Sec[e + f*x])) - (a^2*((a*((-2*(2*c - 3*d)*(c + d)*ArcTan[Sq rt[a - a*Sec[e + f*x]]/Sqrt[a + a*Sec[e + f*x]]])/(a*d) - (2*(c - d)^(3/2) *(2*c + 3*d)*ArcTan[(Sqrt[c + d]*Sqrt[a + a*Sec[e + f*x]])/(Sqrt[c - d]*Sq rt[a - a*Sec[e + f*x]])])/(a*d*Sqrt[c + d])))/d + (2*c*Sqrt[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]])/(a*d)))/(d*(c + d)))*Tan[e + f*x])/(f*Sqrt [a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]))
3.3.6.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 2 Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre eQ[{a, b, c, d}, x] && EqQ[b*c + a*d, 0] && !GtQ[c, 0]
Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x _)), x_] :> With[{q = Denominator[m]}, Simp[q Subst[Int[x^(q*(m + 1) - 1) /(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^(1/q)], x] ] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && L tQ[-1, m, 0] && SimplerQ[a + b*x, c + d*x]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Simp[(b*c - a*d)*(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*((e + f *x)^(p + 1)/(b*(b*e - a*f)*(m + 1))), x] + Simp[1/(b*(b*e - a*f)*(m + 1)) Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 2)*(e + f*x)^p*Simp[a*d*(d*e*(n - 1) + c*f*(p + 1)) + b*c*(d*e*(m - n + 2) - c*f*(m + p + 2)) + d*(a*d*f*(n + p) + b*(d*e*(m + 1) - c*f*(m + n + p + 1)))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && LtQ[m, -1] && GtQ[n, 1] && (IntegersQ[2*m, 2*n, 2*p] || IntegersQ[m, n + p] || IntegersQ[p, m + n])
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[h*(a + b*x)^m*(c + d*x)^(n + 1)*(( e + f*x)^(p + 1)/(d*f*(m + n + p + 2))), x] + Simp[1/(d*f*(m + n + p + 2)) Int[(a + b*x)^(m - 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*g*(m + n + p + 2 ) - h*(b*c*e*m + a*(d*e*(n + 1) + c*f*(p + 1))) + (b*d*f*g*(m + n + p + 2) + h*(a*d*f*m - b*(d*e*(m + n + 1) + c*f*(m + p + 1))))*x, x], x], x] /; Fre eQ[{a, b, c, d, e, f, g, h, n, p}, x] && GtQ[m, 0] && NeQ[m + n + p + 2, 0] && IntegersQ[2*m, 2*n, 2*p]
Int[(((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_ )))/((a_.) + (b_.)*(x_)), x_] :> Simp[h/b Int[(c + d*x)^n*(e + f*x)^p, x] , x] + Simp[(b*g - a*h)/b Int[(c + d*x)^n*((e + f*x)^p/(a + b*x)), x], x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Simp[a ^2*g*(Cot[e + f*x]/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x]])) Subst[Int[(g*x)^(p - 1)*(a + b*x)^(m - 1/2)*((c + d*x)^n/Sqrt[a - b*x]), x ], x, Csc[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[ b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p, 1] || In tegerQ[m - 1/2])
Time = 1.08 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.34
method | result | size |
derivativedivides | \(\frac {16 a^{3} \left (-\frac {\left (c^{2}-2 c d +d^{2}\right ) \left (\frac {d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (c +d \right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )}-\frac {\left (2 c +3 d \right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{2 \left (c +d \right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{4 d^{3}}-\frac {1}{16 d^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}+\frac {\left (2 c -3 d \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{16 d^{3}}-\frac {1}{16 d^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}+\frac {\left (-2 c +3 d \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{16 d^{3}}\right )}{f}\) | \(216\) |
default | \(\frac {16 a^{3} \left (-\frac {\left (c^{2}-2 c d +d^{2}\right ) \left (\frac {d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 \left (c +d \right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d -c -d \right )}-\frac {\left (2 c +3 d \right ) \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{2 \left (c +d \right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{4 d^{3}}-\frac {1}{16 d^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}+\frac {\left (2 c -3 d \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{16 d^{3}}-\frac {1}{16 d^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}+\frac {\left (-2 c +3 d \right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{16 d^{3}}\right )}{f}\) | \(216\) |
risch | \(\frac {2 i a^{3} \left (c^{2} d \,{\mathrm e}^{3 i \left (f x +e \right )}-2 c \,d^{2} {\mathrm e}^{3 i \left (f x +e \right )}+d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+2 c^{3} {\mathrm e}^{2 i \left (f x +e \right )}-c^{2} d \,{\mathrm e}^{2 i \left (f x +e \right )}+c \,d^{2} {\mathrm e}^{2 i \left (f x +e \right )}+3 c^{2} d \,{\mathrm e}^{i \left (f x +e \right )}+d^{3} {\mathrm e}^{i \left (f x +e \right )}+2 c^{3}-c^{2} d +c \,d^{2}\right )}{f \,d^{2} \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right ) \left (c +d \right ) c \left ({\mathrm e}^{2 i \left (f x +e \right )} c +2 d \,{\mathrm e}^{i \left (f x +e \right )}+c \right )}+\frac {2 \sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}+d}{c}\right ) c^{2}}{\left (c +d \right )^{2} f \,d^{3}}+\frac {\sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}+d}{c}\right ) c}{\left (c +d \right )^{2} f \,d^{2}}-\frac {3 \sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}+d}{c}\right )}{\left (c +d \right )^{2} f d}-\frac {2 \sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}-d}{c}\right ) c^{2}}{\left (c +d \right )^{2} f \,d^{3}}-\frac {\sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}-d}{c}\right ) c}{\left (c +d \right )^{2} f \,d^{2}}+\frac {3 \sqrt {\left (c +d \right ) \left (c -d \right )}\, a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i \sqrt {\left (c +d \right ) \left (c -d \right )}-d}{c}\right )}{\left (c +d \right )^{2} f d}-\frac {2 a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c}{d^{3} f}+\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{d^{2} f}+\frac {2 a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c}{d^{3} f}-\frac {3 a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{d^{2} f}\) | \(654\) |
16/f*a^3*(-1/4*(c^2-2*c*d+d^2)/d^3*(1/2*d/(c+d)*tan(1/2*f*x+1/2*e)/(tan(1/ 2*f*x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)-1/2*(2*c+3*d)/(c+d)/((c+d)*(c -d))^(1/2)*arctanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2)))-1/16/d^2 /(tan(1/2*f*x+1/2*e)-1)+1/16*(2*c-3*d)/d^3*ln(tan(1/2*f*x+1/2*e)-1)-1/16/d ^2/(tan(1/2*f*x+1/2*e)+1)+1/16/d^3*(-2*c+3*d)*ln(tan(1/2*f*x+1/2*e)+1))
Leaf count of result is larger than twice the leaf count of optimal. 395 vs. \(2 (152) = 304\).
Time = 0.56 (sec) , antiderivative size = 859, normalized size of antiderivative = 5.34 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^2} \, dx=\left [-\frac {{\left ({\left (2 \, a^{3} c^{3} + a^{3} c^{2} d - 3 \, a^{3} c d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (2 \, a^{3} c^{2} d + a^{3} c d^{2} - 3 \, a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {c - d}{c + d}} \log \left (\frac {2 \, c d \cos \left (f x + e\right ) - {\left (c^{2} - 2 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, {\left (c^{2} + c d + {\left (c d + d^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {\frac {c - d}{c + d}} \sin \left (f x + e\right ) + 2 \, c^{2} - d^{2}}{c^{2} \cos \left (f x + e\right )^{2} + 2 \, c d \cos \left (f x + e\right ) + d^{2}}\right ) + {\left ({\left (2 \, a^{3} c^{3} - a^{3} c^{2} d - 3 \, a^{3} c d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (2 \, a^{3} c^{2} d - a^{3} c d^{2} - 3 \, a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left ({\left (2 \, a^{3} c^{3} - a^{3} c^{2} d - 3 \, a^{3} c d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (2 \, a^{3} c^{2} d - a^{3} c d^{2} - 3 \, a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, {\left (a^{3} c d^{2} + a^{3} d^{3} + {\left (2 \, a^{3} c^{2} d - a^{3} c d^{2} + a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, {\left ({\left (c^{2} d^{3} + c d^{4}\right )} f \cos \left (f x + e\right )^{2} + {\left (c d^{4} + d^{5}\right )} f \cos \left (f x + e\right )\right )}}, \frac {2 \, {\left ({\left (2 \, a^{3} c^{3} + a^{3} c^{2} d - 3 \, a^{3} c d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (2 \, a^{3} c^{2} d + a^{3} c d^{2} - 3 \, a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \sqrt {-\frac {c - d}{c + d}} \arctan \left (-\frac {{\left (d \cos \left (f x + e\right ) + c\right )} \sqrt {-\frac {c - d}{c + d}}}{{\left (c - d\right )} \sin \left (f x + e\right )}\right ) - {\left ({\left (2 \, a^{3} c^{3} - a^{3} c^{2} d - 3 \, a^{3} c d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (2 \, a^{3} c^{2} d - a^{3} c d^{2} - 3 \, a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) + {\left ({\left (2 \, a^{3} c^{3} - a^{3} c^{2} d - 3 \, a^{3} c d^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (2 \, a^{3} c^{2} d - a^{3} c d^{2} - 3 \, a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (a^{3} c d^{2} + a^{3} d^{3} + {\left (2 \, a^{3} c^{2} d - a^{3} c d^{2} + a^{3} d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, {\left ({\left (c^{2} d^{3} + c d^{4}\right )} f \cos \left (f x + e\right )^{2} + {\left (c d^{4} + d^{5}\right )} f \cos \left (f x + e\right )\right )}}\right ] \]
[-1/2*(((2*a^3*c^3 + a^3*c^2*d - 3*a^3*c*d^2)*cos(f*x + e)^2 + (2*a^3*c^2* d + a^3*c*d^2 - 3*a^3*d^3)*cos(f*x + e))*sqrt((c - d)/(c + d))*log((2*c*d* cos(f*x + e) - (c^2 - 2*d^2)*cos(f*x + e)^2 - 2*(c^2 + c*d + (c*d + d^2)*c os(f*x + e))*sqrt((c - d)/(c + d))*sin(f*x + e) + 2*c^2 - d^2)/(c^2*cos(f* x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) + ((2*a^3*c^3 - a^3*c^2*d - 3*a^3*c* d^2)*cos(f*x + e)^2 + (2*a^3*c^2*d - a^3*c*d^2 - 3*a^3*d^3)*cos(f*x + e))* log(sin(f*x + e) + 1) - ((2*a^3*c^3 - a^3*c^2*d - 3*a^3*c*d^2)*cos(f*x + e )^2 + (2*a^3*c^2*d - a^3*c*d^2 - 3*a^3*d^3)*cos(f*x + e))*log(-sin(f*x + e ) + 1) - 2*(a^3*c*d^2 + a^3*d^3 + (2*a^3*c^2*d - a^3*c*d^2 + a^3*d^3)*cos( f*x + e))*sin(f*x + e))/((c^2*d^3 + c*d^4)*f*cos(f*x + e)^2 + (c*d^4 + d^5 )*f*cos(f*x + e)), 1/2*(2*((2*a^3*c^3 + a^3*c^2*d - 3*a^3*c*d^2)*cos(f*x + e)^2 + (2*a^3*c^2*d + a^3*c*d^2 - 3*a^3*d^3)*cos(f*x + e))*sqrt(-(c - d)/ (c + d))*arctan(-(d*cos(f*x + e) + c)*sqrt(-(c - d)/(c + d))/((c - d)*sin( f*x + e))) - ((2*a^3*c^3 - a^3*c^2*d - 3*a^3*c*d^2)*cos(f*x + e)^2 + (2*a^ 3*c^2*d - a^3*c*d^2 - 3*a^3*d^3)*cos(f*x + e))*log(sin(f*x + e) + 1) + ((2 *a^3*c^3 - a^3*c^2*d - 3*a^3*c*d^2)*cos(f*x + e)^2 + (2*a^3*c^2*d - a^3*c* d^2 - 3*a^3*d^3)*cos(f*x + e))*log(-sin(f*x + e) + 1) + 2*(a^3*c*d^2 + a^3 *d^3 + (2*a^3*c^2*d - a^3*c*d^2 + a^3*d^3)*cos(f*x + e))*sin(f*x + e))/((c ^2*d^3 + c*d^4)*f*cos(f*x + e)^2 + (c*d^4 + d^5)*f*cos(f*x + e))]
\[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^2} \, dx=a^{3} \left (\int \frac {\sec {\left (e + f x \right )}}{c^{2} + 2 c d \sec {\left (e + f x \right )} + d^{2} \sec ^{2}{\left (e + f x \right )}}\, dx + \int \frac {3 \sec ^{2}{\left (e + f x \right )}}{c^{2} + 2 c d \sec {\left (e + f x \right )} + d^{2} \sec ^{2}{\left (e + f x \right )}}\, dx + \int \frac {3 \sec ^{3}{\left (e + f x \right )}}{c^{2} + 2 c d \sec {\left (e + f x \right )} + d^{2} \sec ^{2}{\left (e + f x \right )}}\, dx + \int \frac {\sec ^{4}{\left (e + f x \right )}}{c^{2} + 2 c d \sec {\left (e + f x \right )} + d^{2} \sec ^{2}{\left (e + f x \right )}}\, dx\right ) \]
a**3*(Integral(sec(e + f*x)/(c**2 + 2*c*d*sec(e + f*x) + d**2*sec(e + f*x) **2), x) + Integral(3*sec(e + f*x)**2/(c**2 + 2*c*d*sec(e + f*x) + d**2*se c(e + f*x)**2), x) + Integral(3*sec(e + f*x)**3/(c**2 + 2*c*d*sec(e + f*x) + d**2*sec(e + f*x)**2), x) + Integral(sec(e + f*x)**4/(c**2 + 2*c*d*sec( e + f*x) + d**2*sec(e + f*x)**2), x))
Exception generated. \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^2} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*c^2-4*d^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 317 vs. \(2 (152) = 304\).
Time = 0.37 (sec) , antiderivative size = 317, normalized size of antiderivative = 1.97 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^2} \, dx=-\frac {\frac {2 \, {\left (2 \, a^{3} c^{3} - a^{3} c^{2} d - 4 \, a^{3} c d^{2} + 3 \, a^{3} d^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, c - 2 \, d\right ) + \arctan \left (\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c^{2} + d^{2}}}\right )\right )}}{{\left (c d^{3} + d^{4}\right )} \sqrt {-c^{2} + d^{2}}} + \frac {4 \, {\left (a^{3} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - a^{3} c d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - a^{3} c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - a^{3} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 2 \, c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + c + d\right )} {\left (c d^{2} + d^{3}\right )}} + \frac {{\left (2 \, a^{3} c - 3 \, a^{3} d\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{d^{3}} - \frac {{\left (2 \, a^{3} c - 3 \, a^{3} d\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{d^{3}}}{f} \]
-(2*(2*a^3*c^3 - a^3*c^2*d - 4*a^3*c*d^2 + 3*a^3*d^3)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(2*c - 2*d) + arctan((c*tan(1/2*f*x + 1/2*e) - d*tan(1/2* f*x + 1/2*e))/sqrt(-c^2 + d^2)))/((c*d^3 + d^4)*sqrt(-c^2 + d^2)) + 4*(a^3 *c^2*tan(1/2*f*x + 1/2*e)^3 - a^3*c*d*tan(1/2*f*x + 1/2*e)^3 - a^3*c^2*tan (1/2*f*x + 1/2*e) - a^3*d^2*tan(1/2*f*x + 1/2*e))/((c*tan(1/2*f*x + 1/2*e) ^4 - d*tan(1/2*f*x + 1/2*e)^4 - 2*c*tan(1/2*f*x + 1/2*e)^2 + c + d)*(c*d^2 + d^3)) + (2*a^3*c - 3*a^3*d)*log(abs(tan(1/2*f*x + 1/2*e) + 1))/d^3 - (2 *a^3*c - 3*a^3*d)*log(abs(tan(1/2*f*x + 1/2*e) - 1))/d^3)/f
Time = 16.91 (sec) , antiderivative size = 3135, normalized size of antiderivative = 19.47 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))^3}{(c+d \sec (e+f x))^2} \, dx=\text {Too large to display} \]
(a^3*atan(((a^3*((64*tan(e/2 + (f*x)/2)*(4*a^6*c^7 - 9*a^6*d^7 + 27*a^6*c* d^6 - 12*a^6*c^6*d - 16*a^6*c^2*d^5 - 24*a^6*c^3*d^4 + 29*a^6*c^4*d^3 + a^ 6*c^5*d^2))/(2*c*d^5 + d^6 + c^2*d^4) + (a^3*((64*(3*a^3*d^11 - 3*a^3*c*d^ 10 - 4*a^3*c^2*d^9 + 4*a^3*c^3*d^8 + a^3*c^4*d^7 - a^3*c^5*d^6))/(2*c*d^7 + d^8 + c^2*d^6) - (64*a^3*tan(e/2 + (f*x)/2)*(2*c - 3*d)*(c*d^10 - 2*c^3* d^8 + c^5*d^6))/(d^3*(2*c*d^5 + d^6 + c^2*d^4)))*(2*c - 3*d))/d^3)*(2*c - 3*d)*1i)/d^3 + (a^3*((64*tan(e/2 + (f*x)/2)*(4*a^6*c^7 - 9*a^6*d^7 + 27*a^ 6*c*d^6 - 12*a^6*c^6*d - 16*a^6*c^2*d^5 - 24*a^6*c^3*d^4 + 29*a^6*c^4*d^3 + a^6*c^5*d^2))/(2*c*d^5 + d^6 + c^2*d^4) - (a^3*((64*(3*a^3*d^11 - 3*a^3* c*d^10 - 4*a^3*c^2*d^9 + 4*a^3*c^3*d^8 + a^3*c^4*d^7 - a^3*c^5*d^6))/(2*c* d^7 + d^8 + c^2*d^6) + (64*a^3*tan(e/2 + (f*x)/2)*(2*c - 3*d)*(c*d^10 - 2* c^3*d^8 + c^5*d^6))/(d^3*(2*c*d^5 + d^6 + c^2*d^4)))*(2*c - 3*d))/d^3)*(2* c - 3*d)*1i)/d^3)/((128*(4*a^9*c^7 - 9*a^9*c*d^6 - 16*a^9*c^6*d + 36*a^9*c ^2*d^5 - 50*a^9*c^3*d^4 + 20*a^9*c^4*d^3 + 15*a^9*c^5*d^2))/(2*c*d^7 + d^8 + c^2*d^6) + (a^3*((64*tan(e/2 + (f*x)/2)*(4*a^6*c^7 - 9*a^6*d^7 + 27*a^6 *c*d^6 - 12*a^6*c^6*d - 16*a^6*c^2*d^5 - 24*a^6*c^3*d^4 + 29*a^6*c^4*d^3 + a^6*c^5*d^2))/(2*c*d^5 + d^6 + c^2*d^4) + (a^3*((64*(3*a^3*d^11 - 3*a^3*c *d^10 - 4*a^3*c^2*d^9 + 4*a^3*c^3*d^8 + a^3*c^4*d^7 - a^3*c^5*d^6))/(2*c*d ^7 + d^8 + c^2*d^6) - (64*a^3*tan(e/2 + (f*x)/2)*(2*c - 3*d)*(c*d^10 - 2*c ^3*d^8 + c^5*d^6))/(d^3*(2*c*d^5 + d^6 + c^2*d^4)))*(2*c - 3*d))/d^3)*(...